package com.mes.inventory.service;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.data.provider.Page;
import com.mes.common.service.BasicService;
import com.mes.inventory.dao.iface.IWarehouseDeptDao;
import com.mes.inventory.domain.WarehouseDept;
@Service
public class WarehouseDeptService extends BasicService<WarehouseDept>{
	
	@Autowired
	private IWarehouseDeptDao warehouseDeptDao;

	
	//根据id查询仓库
			@DataProvider
			public void getWarehouseDepts(Page<WarehouseDept> page,Map<String, Object> parameter) throws Exception{
				if (null!=parameter) {
					
					String warehouseUid = (String) parameter.get("warehouseUid");
					
					warehouseDeptDao.getWarehouseDept(page, warehouseUid);
					
				}
				
			}
			
			
			
			
			//删除柜位
			@DataResolver
			public void deleteWarehouseDept(Collection<WarehouseDept> warehouseDepts) throws Exception{
				warehouseDeptDao.delete(warehouseDepts);
			}
				
}
